/* Copyright (c) 2010, David Kreuter. See LICENSE for more information */

#include "headers.h"

btx *read_btx(uint8 *buf, uint32 len){
	START(read_btx);
	MAGIC(0,BTX0,read_btx);
	END(read_btx,read_tex(buf+0x14,len-0x14));
}

int write_btx(btx *x, uint8 *buf, uint32 len){
	//TODO
}

void free_btx(btx *x){
	START(free_btx);
	free_tex(x);
	ENDV(free_btx);
}

uint32 size_btx(btx *x){
	START(size_btx);
	END(size_btx,size_tex((tex*)x)+0x14);
}
